package com.ersansiwu.springphoenix;

import com.ersansiwu.springphoenix.model.User;
import com.ersansiwu.springphoenix.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wusj
 */
@RestController
@RequestMapping("phoenix")
public class PhoenixController {
    @Autowired
    private UserService userService;
    @GetMapping("hello")
    public String hello(){
        User user = userService.getUserByKey("3952055531766789111300");
        return user.toString();
    }
}
